#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[55];
int n;
int main(void){
    a[1]=2;
    a[2]=3;
    for(int i=3;i<=50;i++){
        a[i]=a[i-1]+a[i-2];
    }
    while(~scanf("%d",&n)){
        printf("%lld\n",a[n]);
    }
    return 0;
}